@echo off
set str=liuyalong
set /a length=0
call :getLength length %str%
echo %length%
pause>nul
exit



:getLength

set /a %1=0
set str=%2

:start
	set str=%str:~1%
	set /a %1+=1
if "%str%" neq "" goto start 

goto :eof
